import React, {PureComponent} from 'react'
import Master from '../components/Master'
import PropTypes from 'prop-types'
import {Link} from 'react-router-dom'

export default class Index extends PureComponent {
	static contextTypes = {
		router: PropTypes.object
	};

	render() {
		return (
			<Master>
				<ul>
					<li><a href="#/login">Login</a></li>
					<li><a href="javascript:void(0)" onClick={() => {
						this.context.router.history.push('/test/datatable')
					}}>DataTable</a></li>
					<li><a href="javascript:void(0)" onClick={() => {
						this.context.router.history.push({
							pathname: "/test/form"
						})
					}}>Form</a></li>
					<li><Link to={"/test/hello"}>Hello</Link></li>
					<li><Link to={`/test/event/abc?a=1`}>Event</Link></li>
					<li><a href="#/test/math-expression">math-expression</a></li>
					<li><a href="#/test/todo">todo example</a></li>
					<li><a href="#/test/http">http example</a></li>
					<li><a href="#/test/drawing">运筹学图形</a></li>
					<li><a href="#/test/schedule">考试练习设置</a></li>
				</ul>
			</Master>
		);
	}
}